{{response.files.append(URL(r=request,c='static',f='js/jquery.dataTables.min.js'))}}
{{response.files.append(URL(r=request,c='static',f='css/demo_table.css'))}}
{{extend 'layout.html'}}
 
<script type="text/javascript" charset="utf-8"> 
$(document).ready(function() {
    jQuery('.smarttable').dataTable({
        "iDisplayLength": 100,
        "aaSorting": []
    });
} );
</script> 
 
<h1>Programs by Organization</h1> 
 
<button onclick="document.location='{{=URL(r=request,f='create_program',args=organization.id)}}'">Create a New Program</button> 
 
<div> 
<table class="smarttable"> 
<thead> 
<tr> 
    <th>Title</th> 
    <th>Actions</th> 
</tr> 
</thead> 
<tbody> 
{{for program in programs:}}
<tr> 
    <td>{{=program.title}}</td>    
    <td> 
    <a href="{{=URL(r=request,f='view_program',args=program.id)}}">View</a> | 
    <a href="{{=URL(r=request,f='edit_program',args=program.id)}}">Edit</a> 
    </td> 
</tr> 
{{pass}}
</tbody> 
</table> 
</div> 
